//
//  LoginVM.m
//  GuiJuWo
//
//  Created by chenguibang on 16/3/26.
//  Copyright © 2016年 chenguibang. All rights reserved.
//

#import "LoginVM.h"
#import "GBNetToolOperation.h"
#import "GBNetTool.h"

@implementation LoginVM
-(void)signIn{
    GBNetToolOperation *opt = [[GBNetToolOperation alloc]init];
    opt.thirdServer = NO;
    opt.cachePolicy = GBCachePolicyPermanent;
    opt.debugRequestMode = GBDebugzModeRequestConsole;
    opt.debugResposeMode = GBDebugzModeResposeBoth;
    opt.showHud = YES;
    opt.hudText = @"登录中...";
    //    opt.encrypt = YES;
    GJWBaseRequest *request = [[GJWBaseRequest alloc]init];
    request.head.bizCode = @"q0012";
    self.signInModel = [[SignInReqModel alloc]init];
    self.signInModel.userCode = self.name;
    self.signInModel.passWd = self.passwd;
    self.signInModel.sessionId = request.head.sessionId;
    request.body = self.signInModel;
    [GBNetTool netPostAsyn:request success:^(NSDictionary *result) {
        
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        
    } operation:opt];
}
@end
